package com.nbsaas.boot.shop.data.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nbsaas.boot.code.annotation.FormAnnotation;
import com.nbsaas.boot.code.annotation.FormField;
import com.nbsaas.boot.code.annotation.SearchItem;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;


@org.hibernate.annotations.Table(appliesTo = "shop", comment = "店铺")
@Data
@FormAnnotation(title = "商店", model = "商店")
@Entity
@Table(name = "shop")
@TableName("shop")
public class Shop  {

    @TableId(value = "id", type = IdType.AUTO)
    @Id()
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Comment("主键id")
    private Long id;


    @SearchItem(label = "商店名称",name = "name",key = "name")
    @FormField(title = "商店名称", sortNum = "1", grid = true)
    @Column(length = 100)
    @Comment("商店名称")
    private String name;

    @FormField(title = "地址", sortNum = "2", grid = true)
    @Column(length = 100)
    @Comment("地址")
    private String address;



    @Comment("POI唯一标识")
    @Column(length = 100)
    private String poi;

    @Comment("图片")
    @Column(length = 300)
    private String image;

    @FormField(title = "电话", sortNum = "3", grid = true)
    @Column(length = 100)
    @Comment("电话")
    private String phone;

    @FormField(title = "网址", sortNum = "4", grid = true)
    @Column(length = 100)
    @Comment("网址")
    private String website;

    @Comment("经度")
    private Double lng;

    @Comment("纬度")
    private Double lat;

    @Comment("距离中心点的距离")
    private Integer distance;

    @Comment("照片数量")
    private Integer photoNum;

    @FormField(title = "状态", sortNum = "5", grid = true)
    @Comment("状态")
    private Integer state;

    @Comment("POI详情页")
    private String detailUrl;

    @Comment("POI商户的价格")
    private Float price;

    @Comment("营业时间")
    private String shopHours;

    @Comment("总体评分")
    private Float overallRating;

    @Comment("口味评分")
    private Float tasteRating;

    @Comment("服务评分")
    private Float serviceRating;

    @Comment("环境评分")
    private Float environmentRating;

    @Comment("设备评分")
    private Float facilityRating;

    @Comment("卫生评分")
    private Float hygieneRating;

    @Comment("技术评分")
    private Float technologyRating;

    @Comment("图片数量")
    private Float imageNum;

    @Comment("团购数量")
    private Integer grouponNum;

    @Comment("优惠数量")
    private Integer discountNum;

    @Comment("评论数量")
    private Integer commentNum;

    @Comment("收藏数量")
    private Integer favoriteNum;

    @FormField(title = "签到数量", sortNum = "6", grid = true)
    @Comment("签到数量")
    private Integer checkinNum;



    @Comment("省份id")
    private Long province;


    @Comment("城市id")
    private Long city;


    @Comment("区县id")
    private Long area;



}
